<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <%@ include file="/common/dxp/include/common-base.jsp" %>
    <title>服务认证授权</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
</head>

<!-- Part 一、 以下是body主体内容的模块区域 -->
<body class="hold-transition ${sysColor} sidebar-mini">
<div class="wrapper">

    <!-- top start -->
    <%@include file="/common/dxp/top.jsp" %>
    <!-- top end -->
    <!-- left start -->
    <%@include file="/common/dxp/left.jsp" %>
    <!-- left end-->

    <div class="content-wrapper">
        <!-- Main start -->
        <section class="content">
            <div id="div_hidden_content" class="hidden" style="display:none;">
                <input name="templateType" type="hidden" value="all"/>
                <div id="hidden_common_final">
                    <!-- temp="hidden_common_final" start -->
                    <input name="mainObjName" type="hidden" value="dxSysIntRelation">
                    <input name="mainObjPrimaryKey" type="hidden" value="infoId">
                    <input name="objNameAll" type="hidden" value="dxSysIntRelation">
                    <!-- temp="hidden_common_final" end -->
                </div>
                <!-- temp="delForm_hidden" start -->
                <div id="delForm_hidden" style="display:none;">
                    <input type="hidden" name="pageName" value="dx-sys-int-relation"/>
                    <input type="hidden" name="formName" value="delForm"/>
                </div>
                <!-- temp="delForm_hidden" end -->
                <div class="form-group"><select
                        id="initForm1_dxInterfaceReg_exchangeMode"
                        class="form-control  clean"
                        data-temp-obj="dxInterfaceReg.exchangeMode"
                        data-dict-code="dictItemList"
                        data-dict-cate="dataEM" data-type-tag="select"
                        data-def="" placeholder="必填项"
                        data-bv-notempty="true"
                        data-bv-notempty-message="不能为空">
                    <option value="">--请选择--</option>
                </select></div>
                <div class="form-group"><select
                        id="initForm_dxInterfaceReg_interfaceType"
                        class="form-control  clean"
                        data-temp-obj="dxInterfaceReg.interfaceType"
                        data-dict-code="dictItemList" data-dict-cate="sysType"
                        data-type-tag="select" data-def="">
                    <option value="">--请选择--</option>
                </select></div>
                <div class="form-group"><select
                        id="initForm1_dxInterfaceReg_reqMsgFormatType"
                        class="form-control  clean"
                        data-temp-obj="dxInterfaceReg.reqMsgFormatType"
                        data-dict-code="dictItemList"
                        data-dict-cate="msgFormat" data-type-tag="select"
                        data-def="" placeholder="必填项"
                        data-bv-notempty="true"
                        data-bv-notempty-message="不能为空">
                    <option value="">--请选择--</option>
                </select></div>
                <div class="form-group"><select
                        id="initForm_dxInterfaceReg_interfaceProtocol"
                        class="form-control  clean"
                        data-obj-name="dxExchangeProtocol" data-dict-code="dymicSql" data-type-tag="select"
                        data-colmun="{value:'ptlEname',text:'ptlCname'}" data-page-name="dx-exchange-protocol" data-form-name="searchForm"
                        data-def="">
                    <option value="">--请选择--</option>
                </select></div>
                <select id="init_dxSysReg_userOwner" class="form-control  clean"
                        data-temp-obj="dxInterfaceReg.userOwner" data-dict-code="dictItemList" data-dict-cate="dxpUnit" data-type-tag="select" data-def="">
                    <option value="">-请选择--</option>
                </select>
            </div>
            <div class="row">
                <div class="col-xs-12">

                    <!------搜索  start ------->
                    <div class="box box-info">
                        <!--搜索title  start -->
                        <div class="box-header with-border">
                            <h3 class="box-title"><i class="fa fa-search"></i> 服务认证授权</h3>
                            <div class="box-tools pull-right">
                                <button type="button" class="btn btn-box-tool" data-widget="collapse"><i
                                        class="fa fa-minus"></i></button>
                            </div>
                        </div>
                        <!--搜索title  end -->
                        <div class="box-body">
                            <form id="searchForm" action="javascript:;">
                                <!-- temp="searchForm_hidden" start -->
                                <div id="searchForm_hidden" style="display:none;">
                                    <input type="hidden" name="pageName" value="dx-sys-int-relation"/>
                                    <input type="hidden" name="formName" value="searchForm"/>
                                    <input type="hidden" name="orderBy" value="dxSysIntRelation.create_time desc"/>
                                </div>
                                <!-- temp="searchForm_hidden" end -->

                                <!-- temp="searchForm_content" start -->
                                <div id="searchForm_content" class="form-group" data-temp-code="true"
                                     data-temp-type="searchForm" data-temp-form-id="searchForm">


                                    <table class="table table-bordered bordercolor">
                                        <tbody>
                                        <tr>
                                            <td class="active" align="right"><label
                                                    class="form-control-static">服务编号：</label></td>
                                            <td>
                                                <div class="form-group"><input name="dxSysIntRelation.wl_fromInterfaceCode"
                                                                               class="form-control clean" maxlength="30">
                                                </div>
                                            </td>
                                            <td class="active" align="right"><label
                                                    class="form-control-static">服务名称：</label></td>
                                            <td>
                                                <div class="form-group"><input name="dxSysIntRelation.wl_fromInterfaceName"
                                                                               class="form-control clean" maxlength="50">
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="active" align="right"><label
                                                    class="form-control-static">使用单位：</label></td>
                                            <td>
                                                <div class="form-group">
                                                    <select id="searchForm_dxSysIntRelation_applyCompany" name="dxSysIntRelation.w_applyCompany" class="form-control  clean"
                                                            data-temp-obj="dxSysIntRelation.applyCompany" data-dict-code="dictItemList" data-dict-cate="dxpUnit" data-type-tag="select" data-def=""
                                                            placeholder="必填项" data-bv-notempty="true" data-bv-notempty-message="不能为空">
                                                        <option value="">-请选择--</option>
                                                    </select>
                                                </div>
                                            </td>
                                            <td class="active" align="right"><label
                                                    class="form-control-static">使用系统：</label></td>
                                            <td>
                                                <div class="form-group">
                                                    <select id="searchForm_dxSysReg_applySysEname"
                                                            class="form-control  clean"
                                                            name="dxSysIntRelation.w_applySysEname"
                                                            data-obj-name="dxSysReg" data-dict-map-key="authSysReg"
                                                            data-type-tag="select" data-dict-code="dymicSql"
                                                            data-colmun="{value:'sysEname',text:'sysCname'}"
                                                            data-page-name="dx-sys-reg"
                                                            data-form-name="searchForm" data-condition=""
                                                            data-def="" data-dict-cate="">
                                                        <option value="">--请选择--</option>
                                                    </select>
                                                </div>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <!-- temp="searchForm_content" end -->
                            </form>
                            <div class="box-footer text-center">
                                <button type="button" class="btn btn-success" onclick="getTableData();"
                                        data-temp-event="searchForm_hidden"><i class="fa fa-search"></i> 查询
                                </button>
                                 
                                <button type="button" class="btn btn-warning"
                                        onclick="mytools.cleanData('#searchForm');">重置
                                </button>
                            </div>
                        </div>
                    </div>
                    <!------- 搜索 end -------->

                    <!------- 列表 start -------->
                    <div class="box box-success">
                        <!--列表title  start -->
                        <div class="box-header with-border">
                            <h3 class="box-title"><i class="fa fa-table"></i> 查询结果 [共计<span id="dataListTotalCount">0</span>条数据]
                                　　　
                                <button id="button_to_add" onclick="toAdd();" class="btn btn-success" type="button"><i
                                        class="fa fa-plus-circle"></i> 增加授权
                                </button>
                            </h3>
                            <div class="box-tools pull-right">
                                <button type="button" class="btn btn-box-tool" data-widget="collapse"><i
                                        class="fa fa-minus"></i></button>
                            </div>
                        </div>
                        <div class="box-body">
                            <table id="dataList" class="table table-bordered table-hover">
                                <thead>
                                <tr id="dataList_thead_content" data-temp-code="true" data-temp-type="table"
                                    data-temp-show="dataList_template_content">
                                    <th>序号</th>
                                    <!-- temp="dataList_thead_content" start -->

                                    <th data-temp-obj="dxSysIntRelation.applyCompany">使用单位</th>
                                    <th data-temp-obj="dxSysIntRelation.fromInterfaceCode">使用系统</th>
                                    <th data-temp-obj="dxSysIntRelation.fromInterfaceName">提供单位</th>
                                    <th data-temp-obj="dxSysIntRelation.userOwner">提供系统</th>
                                    <th data-temp-obj="dxSysIntRelation.userOwner">服务名称</th>
                                    <th data-temp-obj="dxSysIntRelation.requestUrl">接口发布的请求地址</th>
                                    <th>操作</th>
                                    <!-- temp="dataList_thead_content" end -->
                                </tr>
                                </thead>
                                <tbody id="dataList-body">

                                </tbody>
                            </table>
                        </div>

                        <div class="box-footer text-center">
                            <ul id="dataList-page" class="pagination">
                            </ul>
                        </div>
                    </div>
                    <!------- 列表 end -------->
                </div>
            </div>

            <div win-title="服务认证授权" class="modal fade" id="my_modal_add" tabindex="-1" role="dialog"
                 aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width:80%;">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                ×
                            </button>
                            <h4 class="modal-title">
                                <font color="red">服务认证授权</font> 
                            </h4>
                        </div>

                        <div class="modal-body">

                            <div class="nav-tabs-custom">
                                <ul class="nav nav-tabs" id="myTab-add">
                                </ul>

                                <!-- tab content start -->
                                <div class="tab-content">

                                    <div class="tab-pane active" id="tabAdd_1">
                                        <form class="form-horizontal addFormBody" role="form" id="addForm1" action="javascript:void(0)">
                                            <input type="hidden" class="formToken" id="addForm1_formToken" name="formToken"/>

                                            <table class="table table-bordered bordercolor mb5">
                                                <tbody>
                                                <tr>
                                                    <td class="active" colspan="4">服务使用方</td>
                                                </tr>
                                                <tr>
                                                    <td class="w120" align="right"><label
                                                            class="form-control-static">使用单位：</label></td>
                                                    <td class="w350">
                                                        <div class="form-group">
                                                            <select id="addForm1_dxSysIntRelation_applyCompany" name="dxSysIntRelation.applyCompany" class="form-control  clean"
                                                                    data-temp-obj="dxSysIntRelation.applyCompany" data-dict-code="dictItemList" data-dict-cate="dxpUnit" data-type-tag="select" data-def=""
                                                                    placeholder="必填项" data-bv-notempty="true" data-bv-notempty-message="不能为空" onchange="selectSys(this,'addForm1','applySysEname')">
                                                                <option value="">-请选择--</option>
                                                            </select>
                                                        </div>
                                                    </td>
                                                    <td class="w120" align="right"><label
                                                        class="form-control-static">使用系统：</label></td>
                                                    <td>
                                                        <div class="form-group" id="addForm1_dxSysIntRelation_applySysEname_div">
                                                            <select id="addForm1_dxSysIntRelation_applySysEname"
                                                                    class="form-control  clean"
                                                                    name="dxSysIntRelation.applySysEname"
                                                                    data-temp-obj="dxSysIntRelation.applySysEname"
                                                                    data-obj-name="dxSysReg"
                                                                    data-type-tag="select"
                                                                    data-colmun="{value:'sysEname',text:'sysCname'}"
                                                                    data-page-name="dx-sys-reg-search"
                                                                    data-form-name="searchForm" data-condition=""
                                                                    data-def="" data-dict-cate="" placeholder="必填项"
                                                                    data-bv-notempty="true"  onchange="selectInterface($('#addForm1_dxSysIntRelation_sysEname'),'addForm1')"
                                                                    disabled="disabled"
                                                                    data-bv-notempty-message="不能为空">
                                                                <option value="">--请选择--</option>
                                                            </select>
                                                        </div>
                                                    </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                            <table class="table table-bordered bordercolor mb5">
                                                <tbody>
                                                <tr>
                                                    <td class="active" colspan="4">服务提供方</td>
                                                </tr>
                                                <tr>
                                                    <td class="w120" align="right"><label
                                                            class="form-control-static">提供单位：</label></td>
                                                    <td class="w350">
                                                        <div class="form-group">
                                                            <select id="addForm1_dxSysIntRelation_userOwner" name="dxSysIntRelation.userOwner" class="form-control  clean"
                                                                    data-temp-obj="dxSysIntRelation.userOwner" data-dict-code="dictItemList" data-dict-cate="dxpUnit" data-type-tag="select" data-def=""
                                                                    placeholder="必填项" data-bv-notempty="true" data-bv-notempty-message="不能为空" onchange="selectSys(this,'addForm1','sysEname')">
                                                                <option value="">-请选择--</option>
                                                            </select>
                                                        </div>
                                                    </td>
                                                    <td class="w120" align="right"><label
                                                            class="form-control-static">提供系统：</label></td>
                                                    <td>
                                                        <div class="form-group" id="addForm1_dxSysIntRelation_sysEname_div">
                                                            <select id="addForm1_dxSysIntRelation_sysEname"
                                                                    class="form-control  clean"
                                                                    name="dxSysIntRelation.sysEname"
                                                                    data-temp-obj="dxSysReg.sysEname"
                                                                    data-obj-name="dxSysReg"
                                                                    data-type-tag="select"
                                                                    data-colmun="{value:'sysEname',text:'sysCname',other:'userOwner'}"
                                                                    data-page-name="dx-sys-reg-search"
                                                                    data-form-name="searchForm" data-condition="dxSysReg.w_status=1"
                                                                    data-def="" data-dict-cate="" placeholder="必填项"
                                                                    data-bv-notempty="true" disabled="disabled"
                                                                    onchange="selectInterface($(this),'addForm1')"
                                                                    data-bv-notempty-message="不能为空">
                                                                <option value="">--请选择--</option>
                                                            </select>
                                                        </div>
                                                    </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </form>
                                        <table class="table table-bordered bordercolor mb5">
                                            <tbody>
                                            <tr>
                                                <td class="active">为服务使用方进行服务认证授权</td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div  style="height: 500px; overflow-y: scroll;">
                                                    <table class="table table-bordered bordercolor">
                                                        <thead>
                                                        <tr>
                                                            <th>序号</th>
                                                            <th>服务编号</th>
                                                            <th>服务名称</th>
                                                            <th>授权操作</th>
                                                        </tr>
                                                        </thead>
                                                        <tbody id="dxSysIntRelation_act_settings_body">
                                                        <tr>
                                                            <td colspan="4" class="fx8 text-center">请先选择服务提供系统</td>
                                                        </tr>
                                                        </tbody>
                                                    </table>
                                                    </div>
                                                </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>

                                </div>
                                <!-- tab content e -->
                            </div>

                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
            </div>


            <div win-title="查看窗口" class="modal fade" id="my_modal_view" tabindex="-2" role="dialog"
                 aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width:80%;">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                ×
                            </button>
                            <h4 class="modal-title">
                                <font color="red">查看授权详情</font> 
                            </h4>
                        </div>
                        <div class="modal-body viewForm">

                            <div class="nav-tabs-custom">
                                <ul class="nav nav-tabs" id="myTab-view">
                                </ul>

                                <!-- tab content start -->
                                <div class="tab-content">

                                    <div class="tab-pane active" id="tabView_1">
                                        <form class="form-horizontal" role="form" id="viewForm1"
                                              action="javascript:void(0)">
                                            <input name="dxSysIntRelation.infoId" id="viewForm_dxSysIntRelation_infoId" data-name="dxSysIntRelation.infoId" class="clean" type="hidden"/>

                                            <!-- temp="viewForm1_content" start -->
                                            <div id="viewForm1_content" class="row viewForm mytab2">

                                                <table class="table table-bordered bordercolor">
                                                    <tbody>
                                                    <tr>
                                                        <td class="active" colspan="4">服务使用方</td>
                                                    </tr>
                                                    <tr>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">使用单位：</label></td>
                                                        <td class="w350">
                                                            <div class="form-control-static">
                                                             <span id="viewForm1_dxSysIntRelation_applyCompany"
                                                                   data-dict-cate="dxpUnit"
                                                                   data-dict-code="dictItemList"
                                                                   data-type-tag="select" data-name="dxSysIntRelation.applyCompany"
                                                                   data-dict="dxpUnit"></span>
                                                            </div>
                                                        </td>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">使用系统：</label></td>
                                                        <td>
                                                            <div class="form-control-static">
                                                                <span id="viewForm1_dxSysIntRelation_applySysEname"
                                                                      data-dict-cate="" data-dict-code="dymicSql"
                                                                      data-type-tag="select" data-page-name="dx-sys-reg-search"
                                                                      data-form-name="searchForm"
                                                                      data-obj-name="dxSysReg" data-condition=""
                                                                      data-name="dxSysIntRelation.applySysEname"
                                                                      data-colmun="{value:'sysEname',text:'sysCname'}"></span>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                                <table class="table table-bordered bordercolor">
                                                    <tbody>
                                                    <tr>
                                                        <td class="active" colspan="4">服务提供方</td>
                                                    </tr>
                                                    <tr>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">提供单位：</label></td>
                                                        <td class="w350">
                                                            <div class="form-control-static">
                                                                <span id="viewForm1_dxSysIntRelation_userOwner"
                                                                      data-dict-cate="dxpUnit"
                                                                      data-dict-code="dictItemList"
                                                                      data-type-tag="select" data-name="dxSysIntRelation.userOwner"
                                                                      data-dict="dxpUnit"></span>
                                                            </div>
                                                        </td>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">提供系统：</label></td>
                                                        <td>
                                                            <div class="form-control-static">
                                                                <span id="viewForm1_dxSysIntRelation_sysEname"
                                                                      data-dict-cate="" data-dict-code="dymicSql"
                                                                      data-type-tag="select" data-page-name="dx-sys-reg-search"
                                                                      data-form-name="searchForm"
                                                                      data-obj-name="dxSysReg" data-condition=""
                                                                      data-name="dxSysIntRelation.sysEname"
                                                                      data-colmun="{value:'sysEname',text:'sysCname'}"></span>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                                <table class="table table-bordered bordercolor">
                                                    <tbody>
                                                    <tr>
                                                        <td class="active" colspan="4">接口基本信息</td>
                                                    </tr>
                                                    <tr>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">服务编号：</label></td>
                                                        <td class="w350">
                                                            <div class="form-control-static">
                                                                <span data-name="dxSysIntRelation.fromInterfaceCode"></span>
                                                            </div>
                                                        </td>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">服务名称：</label></td>
                                                        <td>
                                                            <div class="form-control-static">
                                                                <span data-name="dxSysIntRelation.fromInterfaceName" ></span>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr class="show_viewForm1_dxInterfaceReg">
                                                        <td align="right"><label
                                                                class="form-control-static">接口方向：</label></td>
                                                        <td>
                                                            <div class="form-control-static"><span
                                                                    id="viewForm1_dxInterfaceReg_exchangeMode"
                                                                    data-dict-cate="dataEM"
                                                                    data-dict-code="dictItemList" data-type-tag="select"
                                                                    data-name="dxInterfaceReg.exchangeMode"
                                                                    data-dict="dataEM"></span>
                                                            </div>
                                                        </td>
                                                        <td align="right"><label
                                                                class="form-control-static">接口协议：</label></td>
                                                        <td>
                                                            <div class="form-control-static"><span
                                                                    id="viewForm1_dxInterfaceReg_interfaceProtocol"
                                                                    data-dict-cate="dataExchangeProtocol" data-dict-code="dictItemList" data-dict="dataExchangeProtocol" data-type-tag="select"
                                                                    data-name="dxInterfaceReg.interfaceProtocol" ></span></div>
                                                        </td>
                                                    </tr>
                                                    <tr class="show_viewForm1_dxInterfaceReg">
                                                        <td align="right"><label
                                                                class="form-control-static">请求报文格式：</label></td>
                                                        <td>
                                                            <div class="form-control-static"><span
                                                                    id="viewForm1_dxInterfaceReg_reqMsgFormatType"
                                                                    data-dict-cate="msgFormat"
                                                                    data-dict-code="dictItemList" data-type-tag="select"
                                                                    data-name="dxInterfaceReg.reqMsgFormatType"
                                                                    data-dict="msgFormat"></span></div>
                                                        </td>
                                                        <td align="right"><label
                                                                class="form-control-static">接口类型：</label></td>
                                                        <td>
                                                            <div class="form-control-static"><span
                                                                    id="viewForm1_dxInterfaceReg_interfaceType"
                                                                    data-dict-cate="sysType"
                                                                    data-dict-code="dictItemList" data-type-tag="select"
                                                                    data-name="dxInterfaceReg.interfaceType"
                                                                    data-dict="sysType"></span></div>
                                                        </td>
                                                    </tr>
<%--                                                    <tr>--%>
<%--                                                        <td colspan="2">--%>
<%--                                                            <div class="form-control-static">--%>
<%--                                                                <label >请求报文格式</label>--%>
<%--                                                                <pre style="height: 260px; overflow-y: scroll;"><code id="viewForm1_req_msg_form_json"></code></pre>--%>
<%--                                                            </div>--%>
<%--                                                        </td>--%>
<%--                                                        <td colspan="2">--%>
<%--                                                            <div class="form-control-static">--%>
<%--                                                                <label >响应报文格式</label>--%>
<%--                                                                <pre style="height: 260px; overflow-y: scroll;"><code id="viewForm1_resp_msg_form_json"></code></pre>--%>
<%--                                                            </div>--%>
<%--                                                        </td>--%>
<%--                                                    </tr>--%>
                                                    </tbody>
                                                </table>

                                                <table class="table table-bordered bordercolor">
                                                    <tbody>
                                                    <tr>
                                                        <td class="active" colspan="4">接口授权信息</td>
                                                    </tr>
                                                    <tr>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">接口发布使用系统的请求地址：</label></td>
                                                        <td colspan="3">
                                                            <div class="form-control-static"><span id="api_request_url" data-name="dxSysIntRelation.requestUrl" ></span>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">客户端接入标识(AppId)：</label></td>
                                                        <td class="w350">
                                                            <div class="form-control-static">
                                                                <span data-name="dxSysIntRelation.toServerId" ></span>
                                                                <button id="btn_refresh_appId" type="button" onclick="getNewAppId(this,'#viewForm_dxSysIntRelation_infoId')" class="btn btn-warning btn-sm hidden">获取AppId</button>
                                                            </div>
                                                        </td>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">客户端请求公钥(AppKey)：</label></td>
                                                        <td>
                                                            <div class="form-control-static"><span  data-name="dxSysIntRelation.toInterfaceCode" ></span>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">授权时间：</label></td>
                                                        <td>
                                                            <div class="form-control-static"><span  data-name="dxSysIntRelation.createTime" ></span>
                                                            </div>
                                                        </td>
                                                        <td class="w180" align="right"><label
                                                                class="form-control-static">报文加密秘钥：</label></td>
                                                        <td>
                                                            <div class="input-group">
                                                                <input type="text" data-name="dxSysIntRelation.requestPwd" id="update_input_requestPwd" readonly="readonly" maxlength="30"  class="form-control clean" placeholder="可设置秘钥" />
                                                                <div class="input-group-addon"><button class="btn btn-default btn-xs" onclick="settingRequestPwd(this,'#update_input_requestPwd','#viewForm_dxSysIntRelation_infoId');" type="button">设置秘钥</button></div>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                            <!-- temp="viewForm1_content" end -->

                                        </form>
                                        <div class="form-group">
                                            <div class="col-sm-12">
                                                <div class="box-footer text-center">
                                                    <button class="btn btn-success pull-right" type="button"
                                                            onclick="mytools.closeModal('my_modal_view');"> 关闭
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>


                                </div>
                                <!-- tab content e -->
                            </div>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
            </div>

            <!-- Part 二、以下是template模板定义的模块区域 -->
            <script type="text/template" id="dataList-template">
                <? for ( var i = 0; i < rows.length; i++) {?>
                <tr>
                    <td><?=(pageObj.currentPage-1)*10+(i+1)?></td>
                    <!-- temp="dataList_template_content" start -->
                    <td style='display:none;'><input type="hidden" name="input_primaryKey" obj-name="dxSysIntRelation"
                                                     primary="infoId"
                                                     value="<?=strUtil.doNull(rows[i].dxSysIntRelation.infoId,'')?>"/>
                    </td>
                    <td><?=strUtil.doNull(dictListMap['dxpUnit'][rows[i].dxSysIntRelation.applyCompany],'-')?></td>
                    <td><?=strUtil.doNull(dictListMap['authSysReg'][rows[i].dxSysIntRelation.applySysEname],'-')?></td>
                    <td><?=strUtil.doNull(dictListMap['dxpUnit'][rows[i].dxSysIntRelation.userOwner],'-')?></td>
                    <td><?=strUtil.doNull(dictListMap['authSysReg'][rows[i].dxSysIntRelation.sysEname],'-')?></td>
                    <td><?=strUtil.doNull(rows[i].dxSysIntRelation.fromInterfaceName,'')?></td>
                    <td><?=strUtil.doNull(rows[i].dxSysIntRelation.requestUrl,'')?></td>
                    <!-- temp="dataList_template_content" end -->
                    <td>
                        <button type="button" class="btn btn-success btn-xs" onclick="toLoad(this,'view')"><i
                                class="fa fa-search-plus"></i> 查看授权
                        </button>
                        <button type="button" class="btn btn-danger btn-xs" onclick="toDele(this);"><i
                                class="fa fa-trash-o"></i> 删除
                        </button>
                    </td>
                </tr>
                <?}?>
            </script>

            <script type="text/template" id="dxSysIntRelation_act_settings-template">
                <?if(rows.length==0){?>
                    <tr>
                        <td colspan="4" class="fx8 text-center">暂无可用的服务信息</td>
                    </tr>
                <?}?>
                <? for ( var i = 0; i < rows.length; i++) {?>
                <tr>
                    <td><?=(i+1)?></td>
                    <td><?=strUtil.doNull(rows[i].dxInterfaceReg.interfaceCode,'')?></td>
                    <td><?=strUtil.doNull(rows[i].dxInterfaceReg.interfaceName,'')?></td>
                    <td>
                        <div class="interface-reg-box hidden">
                                <input type="text" name="dxSysIntRelation.exchangeMode" value="<?=rows[i].dxInterfaceReg.exchangeMode?>">
                                <input type="text" name="dxSysIntRelation.fromServerId" value="<?=rows[i].dxInterfaceReg.infoId?>">
                                <input type="text" name="dxSysIntRelation.exchangeType" value="<?=rows[i].dxInterfaceReg.exchangeType?>">
                                <input type="text" name="dxSysIntRelation.fromInterfaceName"  value="<?=rows[i].dxInterfaceReg.interfaceName?>">
                                <input type="text" name="dxSysIntRelation.fromInterfaceCode" value="<?=rows[i].dxInterfaceReg.interfaceCode?>">
                        </div>
                        <label class="label fcur f16">
                            <i class="fa fa-close gray" data-relation-info-id="" data-interface-code="<?=rows[i].dxInterfaceReg.interfaceCode?>" onclick="settingActToApplay(this)"></i>
                        </label>
                    </td>
                </tr>
                <?}?>
            </script>


            <!-- Part 三、 以下是js模块区域 -->
            <script>
                var clickMenu = "sys-int-auth";
                var myPage, dataListId, searchFormId;
                myPage = 10;//定义列表数据
                dataListId = "dataList";//显示列表数据div的id
                searchFormId = "searchForm";//搜索表单Id
                /**
                 * 初始化数据字典，id传入#id 返回值Map用法：dictListMap["userType"][rows[i].userType]
                 */
                var dictListMap = DictUtil.initDictAndDymic();

                $(function () {
                    //1、加载分页列表数据
                    getTableData();
                    //2、控制是否启用token
                    //setToken();

                });

                $(function () {
                    //设置数据行选中效果
                    $('#' + dataListId + ' tbody').on('click', 'tr', function (e) {
                        if ($(this).hasClass('selected')) {
                        } else {
                            $('tr.selected').removeClass('selected');
                            $(this).addClass('selected');
                        }
                        //var id = $('tr.selected th').eq(0).html();
                    });
                });
                //注入日历框样式
                var dateObject = $('.datepicker').datepicker({
                    language: 'zh-CN',
                    //inline: true,
                    todayBtn: "linked",
                    format: "yyyy-mm-dd",
                    autoclose: true
                }).on('hide', function (e) {
                    //bootstrap datepicker与bootstrapValidator同时使用时选择日期后无法正常触发校验的解决方法
                    //当日期选择框关闭时，执行刷新校验。
                    var fieldName = $(this).attr("name");//获取当前元素name
                    var formId = $(this).parents("form").eq(0).attr("id");//获取当前元素所在父层级中的就近的formId
                    $("#" + formId).data('bootstrapValidator').updateStatus(fieldName, 'NOT_VALIDATED', null).validateField(fieldName);
                });

                //给模态窗口内form表单内的所有支持必填项的元素注入校验
                $(".modal").on('shown.bs.modal', function () {
                    $(this).find("form").each(function () {
                        var formId = $(this).attr("id");
                        if (!strUtil.isNull(formId)) {
                            formId = "#" + formId;
                            setValidate(formId);//定义add表单验证属性
                            mytools.cleanValidate(formId);//清空上次校验规则提示
                        }
                    });
                });

                //打开添加modal
                function toAdd() {
                    $(".addFormBody").find("code").text("");
                    mytools.cleanData(".addFormBody");//清空表单元素上次填写的内容；
                    $(".datepicker").val("");
                    $("#my_modal_add").modal("show");
                }

                //数据toLoad读取（查看、编辑）数据
                function toLoad(obj, type) {
                    if ("view" == type) {
                        $("#my_modal_view").find("code").text("");
                        $("#my_modal_view").modal("show");
                    } else if ("edit" == type) {
                        mytools.cleanData(".editFormBody");//清空表单元素上次填写的内容；
                        $("#my_modal_edit").modal("show");
                    }
                    var paramLoadData = {};
                    var inputPrimaryObj = $(obj).parent().parent().find("input[name='input_primaryKey']");
                    paramLoadData["pageName"] = $("#searchForm").find("input[name='pageName']").val();
                    paramLoadData["formName"] = $("#searchForm").find("input[name='formName']").val();
                    if (inputPrimaryObj.length > 0) {
                        for (var k = 0; k < inputPrimaryObj.length; k++) {
                            var pkobj = $(inputPrimaryObj[k]);
                            paramLoadData[pkobj.attr("obj-name") + ".w_" + pkobj.attr("primary")] = pkobj.val();
                        }
                        $.get(common_info_url, paramLoadData, function (myData) {
                            console.log(myData);
                            //反显加载数据
                            if (myData) {
                                for (var objNameKey in myData) {
                                    FormUtil.loadView(objNameKey, myData[objNameKey], "#my_modal_" + type);
                                }
                                //查询服务接口相关信息
                                var infoId = myData["dxSysIntRelation"].fromServerId;
                                var appId = myData["dxSysIntRelation"].toServerId;
                                if(strUtil.isNull(appId)){
                                    $("#my_modal_" + type).find("#btn_refresh_appId").removeClass("hidden");
                                }else{
                                    $("#my_modal_" + type).find("#btn_refresh_appId").addClass("hidden");
                                }
                                paramLoadData={};
                                paramLoadData["pageName"] = "dx-interface-reg";
                                paramLoadData["formName"] = "searchForm";
                                paramLoadData["dxInterfaceReg.w_infoId"] = infoId;
                                console.log(paramLoadData,"paramLoadData");
                                $.get(common_info_url, paramLoadData, function (myData2) {
                                    // console.log(myData2,"123123");
                                    //反显加载数据
                                    if (myData2) {
                                        for (var objNameKey in myData2) {
                                            FormUtil.loadView(objNameKey, myData2[objNameKey], ".show_viewForm1_dxInterfaceReg");
                                        }
                                        // var reqMsgFormatType = myData2["dxInterfaceReg"].reqMsgFormatType;
                                        // var respMsgFormatType = myData2["dxInterfaceReg"].respMsgFormatType;
                                        // selectMsgFormat(infoId,"viewForm1_req_msg_form_json",reqMsgFormatType,"req");
                                        // selectMsgFormat(infoId,"viewForm1_resp_msg_form_json",respMsgFormatType,"resp");
                                        var protocol = myData2["dxInterfaceReg"].interfaceProtocol;
                                        $.get(ctx+"/api/reqUrl/gateway-server/", paramLoadData, function (myData3) {
                                            //反显加载数据
                                            if (myData3.flag=="T") {
                                                var urlstr = $("#api_request_url").html();
                                                if(urlstr.indexOf("/receive")>-1){
                                                    urlstr =urlstr.replace("/receive", "");
                                                }
                                                if("ftp"==protocol.toLowerCase()){
                                                    urlstr ="receive/file"+urlstr;
                                                }else{
                                                    urlstr ="receive"+urlstr;
                                                }
                                                $("#api_request_url").html(myData3.msg+urlstr);
                                            }
                                        }, "json");
                                    }
                                }, "json");
                            }
                        }, "json");
                    }
                }


                //删除调用
                function toDele(obj) {
                    if (!$("#delForm_hidden").find("input[name='formName']").val()) {
                        layer.alert("缺失删除参数！");
                        return;
                    }
                    var index_submit = layer.confirm("您确定要删除信息吗？", {btn: ["Yes", "No"], closeBtn: 0, offset: "220px"}
                        , function () {
                            layer.close(index_submit);
                            var paramData = {};
                            var inputPrimaryObj = $(obj).parent().parent().find("input[name='input_primaryKey']");
                            paramData["pageName"] = $("#delForm_hidden").find("input[name='pageName']").val();
                            paramData["formName"] = $("#delForm_hidden").find("input[name='formName']").val();
                            if (inputPrimaryObj.length > 0) {
                                for (var k = 0; k < inputPrimaryObj.length; k++) {
                                    var pkobj = $(inputPrimaryObj[k]);
                                    paramData[pkobj.attr("obj-name") + ".w_" + pkobj.attr("primary")] = pkobj.val();
                                }
                                $.ajax({
                                    type: "post",
                                    url: common_submit_url,
                                    data: paramData, dataType: "json",
                                    success: function (myData) {
                                        var result = myData.flag;
                                        if (result == "T") {
                                            refresh();
                                        } else {
                                            layer.alert("删除失败！");
                                        }
                                    }
                                });
                            }
                        });
                }

                //加载列表数据
                function getTableData() {
                    if (strUtil.isNull($("#" + searchFormId).find("input[name='pageName']").val())) {
                        return;
                    }
                    var index_load = layer.load(1, {shade: false});
                    $.ajax({
                        type: 'get',
                        url: common_list_url,
                        data: $("#" + searchFormId).serialize() + getCurrentPage(common_list_url + "?" + $("#" + searchFormId).serialize(), myPage),
                        dataType: 'json',
                        success: function (myData) {
                            console.log(myData);
                            $("#dataListTotalCount").text(myData.total);
                            if ("T" == myData.flag) {
                                var data = baidu.template(dataListId + "-template", eval(myData));
                                $("#" + dataListId + "-body").html(data);
                                var option = {
                                    ele: $("#" + dataListId + "-page")[0],
                                    total: myData.total,
                                    fn: getTableData,
                                    url: common_list_url + "?" + $("#" + searchFormId).serialize()
                                }
                                generatePages(option);

                            }
                            layer.close(index_load);
                        }
                    });
                }
                //获取系统下的接口列表
                function getInterfaceListBySysName(sysEname) {
                    if(strUtil.isNull(sysEname)){
                        $("#dxSysIntRelation_act_settings_body").html('<tr><td colspan="4" class="fx8 text-center">请先选择服务提供系统</td></tr>');
                        return;
                    }
                    var index_load = layer.load(1, {shade: false});
                    $.ajax({
                        type: 'get',
                        url: common_list_url,
                        data: {'pageName':'dx-interface-reg','formName':'searchForm','dxInterfaceReg.w_enabled':'1','dxInterfaceReg.w_sysEname':sysEname},
                        dataType: 'json',
                        success: function (myData) {
                            console.log('getListBySysName',myData);
                            if ("T" == myData.flag) {
                                var data = baidu.template("dxSysIntRelation_act_settings-template", eval(myData));
                                $("#dxSysIntRelation_act_settings_body").html(data);
                                var applyCompayVal = $('#addForm1_dxSysIntRelation_applyCompany').val();
                                var applySysEnameVal = $('#addForm1_dxSysIntRelation_applySysEname').val();
                                var userOwnerVal = $('#addForm1_dxSysIntRelation_userOwner').val();
                                var sysEnameVal = $('#addForm1_dxSysIntRelation_sysEname').val();
                                if(!strUtil.isNull(applyCompayVal) && !strUtil.isNull(applySysEnameVal)){
                                    //查询该使用单位的业务系统已经被授权的接口
                                    $.ajax({
                                        type: 'get',
                                        url: common_list_url,
                                        data: {'pageName':'dx-sys-int-relation','formName':'searchForm',
                                            'dxSysIntRelation.w_applyCompany':applyCompayVal,'dxSysIntRelation.w_applySysEname':applySysEnameVal,
                                            'dxSysIntRelation.w_userOwner':userOwnerVal,'dxSysIntRelation.w_sysEname':sysEnameVal},
                                        dataType: 'json',
                                        success: function (myData2) {
                                            console.log('getListByapplySysEname',myData2);
                                            if ("T" == myData2.flag && myData2.total>0) {
                                                for(var j=0;j<myData2.rows.length;j++){
                                                    var relatObj = myData2.rows[j]['dxSysIntRelation'];
                                                    if(relatObj){
                                                        var relatInfoId = relatObj['infoId'];
                                                        var fromInterfaceCode = relatObj['fromInterfaceCode'];
                                                        var iCheckedObj = $("#dxSysIntRelation_act_settings_body").find("i[data-interface-code='"+fromInterfaceCode+"']");
                                                        if(iCheckedObj){//打钩
                                                            iCheckedObj.addClass('fa-check fx1').removeClass('fa-close gray');
                                                            iCheckedObj.attr('data-relation-info-id',relatInfoId);
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    });
                                }
                            }
                            layer.close(index_load);
                        }
                    });
                }
                //点击授权
                function settingActToApplay(obj) {
                    var thisFormId = '#addForm1';
                    var validate = $(thisFormId).data('bootstrapValidator').validate();
                    if (!validate.isValid()) { //如果校验不通过就返回
                        return;
                    }
                    var ibox = $(obj).parent().parent().find(".interface-reg-box");
                    var paramMap = {'pageName':'dx-sys-int-relation','formName':'addForm'};
                    var isAddAct = false;
                    if($(obj).hasClass("fa-check")){
                        isAddAct=false;//取消权限
                        paramMap['formName'] = 'delForm';
                        var rinfoId = $(obj).attr('data-relation-info-id');
                        paramMap['dxSysIntRelation.w_infoId']=rinfoId;
                    }else{
                        isAddAct=true;//授予权限
                        paramMap['formName'] = 'addForm';
                        ibox.find("input").each(function () {
                            var keys = $(this).attr("name");
                            var vals = $(this).val();
                            paramMap[keys]=vals;
                        });
                        $(thisFormId).find("select").each(function () {
                            var keys = $(this).attr("name");
                            var vals = $(this).val();
                            paramMap[keys]=vals;
                        });
                    }
                    console.log('settingActToApplay.req',isAddAct,thisFormId,paramMap);
                    var index_load = layer.load(1, {shade: false});
                    $.ajax({
                        type: 'post',
                        url: common_submit_url,
                        data: paramMap,
                        dataType: 'json',
                        success: function (myData) {
                            console.log('settingActToApplay.res',myData);
                            if ("T" == myData.flag) {
                                if (isAddAct){
                                    layer.msg('授权完成！');
                                    $(obj).addClass('fa-check fx1').removeClass('fa-close gray');
                                }else{
                                    $(obj).addClass('fa-close gray').removeClass('fa-check fx1');
                                    layer.msg('取消授权完成！')
                                }
                                refresh();
                            }
                            layer.close(index_load);
                        }
                    });
                }

                //获取最新AppId
                function getNewAppId(obj,el) {
                    var index_load = layer.load(1, {shade: false});
                    var relationInfId = $(el).val();
                    var paramMap = {'pageName':'dx-sys-int-relation','formName':'addForm','optTypes':'2','relationInfId':relationInfId};
                    $.ajax({
                        type: 'post',
                        url: common_submit_url,
                        data: paramMap,
                        dataType: 'json',
                        success: function (myData) {
                            console.log('getNewAppId.res',myData);
                            if ("T" == myData.flag && myData.result) {
                                var thisTrObj = $(obj).parent().parent().parent();
                                var new_appIdVal = strUtil.doNull(myData.result.appId,"");
                                var new_appKeyVal = strUtil.doNull(myData.result.appKey,"");
                                if(!strUtil.isNull(new_appIdVal)){
                                    thisTrObj.find("span[data-name='dxSysIntRelation.toServerId']").text(new_appIdVal);
                                    thisTrObj.find("span[data-name='dxSysIntRelation.toInterfaceCode']").text(new_appKeyVal);
                                    $(obj).addClass("hidden");
                                }
                            }
                            layer.close(index_load);
                        }
                    });
                }

                //设置秘钥
                function settingRequestPwd(obj,pwdel,idel) {
                    if($(obj).hasClass('btn-default')){
                        $(obj).addClass('btn-info').removeClass("btn-default");
                        $(pwdel).attr("readonly",false);
                        $(obj).text("保存秘钥");
                    }else{
                        var pwdVal = $(pwdel).val();
                        var index_load = layer.load(1, {shade: false});
                        var paramMap = {'pageName':'dx-sys-int-relation','formName':'editForm','dxSysIntRelation.w_infoId':$(idel).val()};
                        if(strUtil.isNull(pwdVal)){
                            paramMap['dxSysIntRelation.s_requestPwd']='';
                        }else{
                            paramMap['dxSysIntRelation.requestPwd']=pwdVal;
                        }
                        $.ajax({
                            type: 'post',
                            url: common_submit_url,
                            data: paramMap,
                            dataType: 'json',
                            success: function (myData) {
                                console.log('settingRequestPwd.res',myData);
                                if ("T" == myData.flag && myData.result) {
                                    $(pwdel).attr("readonly",true);
                                    $(obj).addClass('btn-default').removeClass("btn-info");
                                    $(obj).text("设置秘钥");
                                }
                                layer.close(index_load);
                            }
                        });
                    }
                }

                //提交tab1表单数据
                function submitForm1(formId, tabId) {
                    //校验规则-表单提交时触发
                    var validate = $('#' + formId).data('bootstrapValidator').validate();
                    if (!validate.isValid()) { //如果校验不通过就返回
                        return;
                    }

                    var index_submit = layer.confirm('您确定要保存信息吗？', {btn: ['Yes', 'No'], closeBtn: 0, offset: '220px'}
                        , function () {
                            var result = submitForm(formId, tabId);
                            if (result) {
                                layer.alert("提交成功！", {closeBtn: 0});
                                mytools.closeModal("my_modal_add");
                                mytools.closeModal("my_modal_edit");
                                refresh();


                                setToken();
                                if (!strUtil.isNull(tabId)) {
                                    $('.nav-tabs a[href=\"#' + tabId + '\"]').tab('show'); // Select tab by name
                                }
                            }
                        });

                }

                //提交表单数据
                function submitForm(formId, tabId) {
                    var result;
                    var index_load = layer.load(1, {shade: false});
                    $.ajax({
                        type: 'post',
                        url: common_submit_url,
                        data: $("#" + formId).serialize(),
                        async: false,
                        dataType: 'json',
                        success: function (myData) {
                            console.log(myData);
                            if (myData.flag == "T") {
                                result = myData;
                            } else {
                                setToken();
                                layer.alert(myData.msg);
                            }
                            layer.close(index_load);
                        },
                        error: function (e) {
                            layer.close(index_load);
                        }
                    });
                    return result;
                }
                //根据使用单位动态加载使用系统
                function selectSys(obj,formId,objName) {
                    var option = $(obj).find("option:selected");
                    var targetObjNameSelectObj = $("#"+formId+"_dxSysIntRelation_"+objName);
                    var optionSelectedVal = option.val();
                    if(!strUtil.isNull(optionSelectedVal)){
                        targetObjNameSelectObj.attr("data-dict-code",'dymicSql');
                        targetObjNameSelectObj.attr("data-condition","dxSysReg.w_status=1&dxSysReg.w_userOwner="+option.val());
                        targetObjNameSelectObj.attr("disabled",false);
                    }else {
                        targetObjNameSelectObj.attr("data-condition","");
                        targetObjNameSelectObj.attr("disabled",true);
                        targetObjNameSelectObj.removeAttr('data-dict-code');
                    }
                    getInterfaceListBySysName('');
                    var fatherDivId = "#"+targetObjNameSelectObj.parent().attr("id");
                    console.log('selectSys',formId,objName,fatherDivId);
                    DictUtil.initDictAndDymic(fatherDivId);
                }
                function selectInterface(obj,formId) {
                    var option = obj.find("option:selected");
                    var thisSysName=option.val();
                    var applySysEnameVal = $('#'+formId).find("select[name='dxSysIntRelation.applySysEname']").val();
                    if(thisSysName==applySysEnameVal){
                        layer.msg('使用系统和提供系统不能相同！');
                        obj.val('');
                        thisSysName='';
                    }
                    getInterfaceListBySysName(thisSysName);
                }


                function selectMsgFormat(infoId,codeId,msgFormatType,msgType) {
                    var paramLoadData={};
                    paramLoadData["pageName"] = "dx-msg-format-set-search";
                    paramLoadData["formName"] = "searchForm";
                    paramLoadData["interfaceId"] = infoId;
                    paramLoadData["msgFormatType"] = msgFormatType;
                    paramLoadData["msgType"] = msgType;
                    $.get(common_info_url, paramLoadData, function (myData) {
                        console.log(myData,"myDatajson");
                        if(myData.result=="T"){
                            if("json"==msgFormatType){
                                mytools.showJsonViewer(myData.entity,codeId);
                            }else{
                                mytools.showXmlFormat(codeId,myData.entity);
                            }
                        }else{
                            $("#"+codeId).html("暂未配置报文格式。");
                        }
                    }, "json");
                }

                function HTMLEncode(html) {
                    var temp = document.createElement("div");
                    // console.dir(temp);
                    (temp.textContent != null) ? (temp.textContent = html) : (temp.innerText = html);
                    var output = temp.innerHTML;
                    temp = null;
                    return output;
                }
                //刷新
                function refresh() {
                    getTableData();
                }

                //设置token
                function setToken() {
                    $.ajax({
                        type: 'get',
                        url: '${ctx}/sendPage/token?token=true',
                        dataType: 'text',
                        success: function (myData) {
                            console.log(myData);
                            $('.formToken').val(myData);
                        }
                    });
                }


                /**** Part 四、以下是自定义新增方法  ****/
//1.定义校验规则-定义
                function setValidate(id) {
                    $(id).each(function () {
                        $(this).bootstrapValidator({
                            feedbackIcons: {
                                valid: 'glyphicon glyphicon-ok',
                                invalid: 'glyphicon glyphicon-remove',
                                validating: 'glyphicon glyphicon-refresh'
                            }, /** 以下需要结合实际业务清空补充个表单元素的验证规则 **/
                            fields: {
                                /** 可自定义新增验证规则
                                 "uctUser.userEname":{
		    		 validators: {
		    			 regexp: {
		    				 regexp: /^[0-9]+$/,
		                      message: '只能是数字'
		                  }
		              }
		    	}
                                 **/
                            }
                        });
                    });
                }


            </script>
        </section>
        <!-- Main end -->
    </div>
    <!-- foot start -->
    <%@include file="/common/dxp/foot.jsp" %>
    <!-- foot start -->
</div>
<!-- /.content-wrapper -->
</body>
</html>















